package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)  // 忽略未知字段
public class BaiduIpLocation {
    private Integer status;
    private String message;
    private String address;  // 新增字段
    private Content content;

    @Data
    public static class Content {
        private String address;
        private Point point;
        private AddressDetail address_detail;

        @Data
        public static class Point {
            @JsonProperty("x")
            private String lng; // 经度
            @JsonProperty("y")
            private String lat; // 纬度
        }

        @Data
        public static class AddressDetail {
            private String province;
            private String city;
            private String district;
            private String street;
            @JsonProperty("street_number")
            private String streetNumber;
            @JsonProperty("city_code")
            private Integer cityCode;
            private String adcode;
        }
    }
}